< previous page page_568 next page >

Page 568
9f31265bb40b592b1929e18a47ab28e5.gif
      Case DRIVE_FIXED
         txtDriveType = "Hard Disk Drive"
      Case DRIVE_REMOTE
         txtDriveType = "Network or Remote Drive"
      Case DRIVE_CD_ROM
         txtDriveType = "CD-ROM Drive"
      Case Else
         txtDriveType = "Unknown Type or Drive Does Not Exist"
   End Select
End Sub
8160-0568a.gif
Figure 28.7
Retrieving the type of disk drive for any drive letter.
The GetDriveType() function expects you to pass a string value from A to Z with a colon (:) and backslash (\) added to it. This function returns a long value that represents the type of drive selected. The long value thats returned is then compared against the list of defined constants that determine the type of drive.
Retrieving System Resources
In most Windows applications, an About box is provided that describes the application. Sometimes the About box contains system information about the particular machine and the Windows environment. This system information may include the processor type, the total memory, and even the different types of memory available. Other times, the About box only describes the application, and a System Info command button is supplied. If this System Info command button is clicked, a separate utility is called to display the system information.
System Information Utility
The Microsoft System Information utility, shown in Figure 28.8, is a common file thats typically installed with the Microsoft Office applications. The name of this executable is MSINFO32.EXE; you can search your hard drive for this utility. You can write your application so that this utility is called from your own command button, or you can write the appropriate API calls to duplicate this information.

 
< previous page page_568 next page >

If you like this book, buy it!